#ifndef QUOTE_H
#define QUOTE_H

#include <string>
#include <iostream>


class Quote
{
public:
    Quote() = default;
    Quote(const std::string &book, const double sales_price) :
        bookNo(book), price(sales_price) { }
    virtual ~Quote() = default;
    std::string isbn() const { return bookNo; }
    virtual double net_price(std::size_t cnt) const { return cnt * price; }
private:
    std::string bookNo;
protected:
    double price = 0.0;
};

class Disc_quote : public Quote {
public:
    Disc_quote() = default;
    Disc_quote(const std::string &book, const double price,
               std::size_t qty, double disc) :
        Quote(book, price), quantity(qty), discount(disc) { }
    double net_price(std::size_t) const = 0;
protected:
    std::size_t quantity = 0;
    double discount = 0.0;
};

class Bulk_quote : public Disc_quote {
public:
    Bulk_quote() = default;
    Bulk_quote(const std::string &b, double p, std::size_t qty, double disc) :
        Disc_quote(b, p, qty, disc) { }
    double net_price(std::size_t cnt) const override;
private:
    std::size_t min_qty = 0;
    double discount = 0.0;
};

class Limited_quote : public Disc_quote {
public:
    double net_price(std::size_t) const override;
private:
    std::size_t min_qty = 0;
    double discount;
};


double print_total(std::ostream &os, const Quote &item, std::size_t n);
#endif // QUOTE_H
